package org.ymjava.medical.db.AllPackage.biz;

import org.springframework.stereotype.Service;
import org.ymjava.medical.db.AbstractBaseBiz.BaseBiz;
import org.ymjava.medical.db.AllPackage.entity.SysUserRole;
import org.ymjava.medical.db.AllPackage.mapper.SysUserRoleMapper;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;

/**
 * 用户角色关联表
 *
 * @author zhy
 * @email ${email}
 * @date 2020-04-03 15:53:44
 */
@Service
public class SysUserRoleBiz extends BaseBiz<SysUserRoleMapper,SysUserRole> {

	@Resource
	private SysUserRoleMapper sysUserRoleMapper;

	public void deleteUserRole(Integer uid){
		Example example = new Example(SysUserRole.class);
		example.or().andEqualTo("user_id",uid);
		sysUserRoleMapper.deleteByExample(example);
	}
}